package com.gpzx.zx.module.home.frame.presenter

import com.gpzx.zx.module.home.frame.view.OrgInfoView
import com.gpzx.zx.module.home.ui.activity.OrgInfoActivity
import com.gpzx.zx.utlis.GpDbUtlis
import com.wkq.base.frame.mosby.MvpBasePresenter

/**
 *
 * 作者:吴奎庆
 *
 * 时间:2020/7/4
 *
 * 用途:
 */


class OrgInfoPresenter : MvpBasePresenter<OrgInfoView> (){
    fun getData(orgInfoActivity: OrgInfoActivity, orgId: String) {

       var db= GpDbUtlis(orgInfoActivity);
       var orgInfo= db.getOrgById(orgId)
        view.showView(orgInfo)

        if(orgInfo!=null){
            view.showNews(GpDbUtlis(orgInfoActivity).getOrgTypeByName(orgInfo.o_name) )
        }
    }
}